package practice;

import java.io.File;

public class Test02 {
    public static void main(String[] args) {
        File file = new File(".");
        File[] files = file.listFiles(file1 -> file1.getName().endsWith(".txt"));
        System.out.println(files.length);
        for(int i=1;i<=100;i++) {
            files[i-1].delete();
        }
        System.out.println("删除完成");
    }
}
